// 管理所有后台的路由

module.exports = app => {
    const adminauth = app.middleware.adminauth();
    

    console.log(adminauth, "----进入路由-----");
    app.router.get('/api/admin/index',app.controller.admin.home.index)
    app.router.post('/api/admin/Login',app.controller.admin.home.Login)
    app.router.post('/api/admin/checkLogin',app.controller.admin.home.checkLogin)
    // app.router.get('/admin/getTypeInfo', adminauth, app.controller.admin.home.getTypeInfo)
    // app.router.post('/admin/addArticle', adminauth, app.controller.admin.home.addArticle)
    // app.router.post('/admin/updateArticle', adminauth, app.controller.admin.home.updateArticle)
    // app.router.get('/admin/getArticleList', adminauth, app.controller.admin.home.getArticleList)
    // app.router.get('/admin/delArticle/:id', adminauth, app.controller.admin.home.delArticle)
    // app.router.get('/admin/getArticleById/:id', adminauth, app.controller.admin.home.getArticleById)
  
  }